$(function(){
	var walletType=sessionStorage.getItem("walletType");
	var logonToken=sessionStorage.getItem("logonToken");
	var playId=sessionStorage.getItem("playId");
	
	
//	获取数据
	var page=1;
	var rows=7;
	function persona_list(page){
		var json = {
	        "logonToken": logonToken,
	        "walletType": walletType,
	        "playId":playId,
	        "page":page,
	        "rows":rows
	    }
	    $.ajax({
	        type: "post",
	        url: url + '/bigWinner/api/personCenter/personCenter',
	        data: JSON.stringify(json),
	        dataType: 'json',
	        contentType: "application/json",
	        success: function(result) {
	            if(result.success) {
	            	var html ='';
	            	var data=result.obj.list;
	            	for(var i in data){
	            		if(data[i].walletType == "0"){
	            			html += '<ul><li>'+data[i].id+'</li><li>BTC</li><li>'+data[i].activityName+'</li></ul>';
	            		}else{
	            			html += '<ul><li>'+data[i].id+'</li><li>ETH</li><li>'+data[i].activityName+'</li></ul>';
	            		}
	            	}
	            	$(".per_list").append(html);
	            } else {
	                $(".load_more").html("暂无更多记录");
	            }
	        },
	        error: function(XMLHttpRequest, textStatus, errorThrown) {
	            alert("请求失败："+XMLHttpRequest.status);
	        }
	    });
	}
 	
    
    persona_list(page);
	
	$(".load_more").on("click",function(){
		if($(this).html() != "暂无更多记录"){
			page++; 
			persona_list(page);
		}
	})
})
